<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">


<ui:composition template="/WEB-INF/template/basicTemplate.xhtml">

	<ui:define name="content">
		<h:inputHidden rendered="#{menuController.userRank != 1}" value="#{menuController.redirect()}"></h:inputHidden>
		<h:inputHidden value="#{menuController.setUrl(request.requestURL)}"></h:inputHidden>
		<h:inputHidden rendered="#{menuController.userRank == 1}">
		<h:form>
			<br />
			<h:panelGrid columns="4" styleClass="questiontable inner-table">
				<h:outputText value="Domain: " styleClass="boldText"></h:outputText>

				<h:selectOneListbox value="#{domainBean.selectedDomain}"
					styleClass="droplist dropList" size="1">
					<f:selectItems value="#{domainBean.al}" />
					<f:ajax execute="@this" listener="#{domainBean.findCategory}"
						render="categoriesListBox" />

				</h:selectOneListbox>
				<h:outputText value="Category: " styleClass="boldText"></h:outputText>
				<h:selectOneListbox id="categoriesListBox"
					value="#{domainBean.selectedCategory}" styleClass="droplist dropList"
					size="1">
					<f:selectItems value="#{domainBean.categNames}" />
				</h:selectOneListbox>
			</h:panelGrid>

			<br />
			<br />
			<h3><h:outputText value="Question: "></h:outputText> <h:inputTextarea
				styleClass="inputText questionText"
				value="#{domainBean.questionText}" /><br />
			<br />

			</h3>
			<h:panelGrid columns="3" styleClass="questiontable ">
				<f:facet name="header">
					<h:outputText
						value="Answers &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Answer Text &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Correct " />
				</f:facet>
				<h:outputText value="Answer1&nbsp;&nbsp;&nbsp;&nbsp;"></h:outputText>
				<h:inputText styleClass="inputText answerText"
					value="#{domainBean.answer1}"></h:inputText>

				<h:selectManyCheckbox styleClass="inner-table"
					value="#{domainBean.checkbox1}">

					<f:selectItem itemLabel="" itemValue="1" />

				</h:selectManyCheckbox>

				<h:outputText value="Answer2"></h:outputText>
				<h:inputText styleClass="inputText answerText"
					value="#{domainBean.answer2}"></h:inputText>

				<h:selectManyCheckbox styleClass="inner-table"
					value="#{domainBean.checkbox2}">
					<f:selectItem itemLabel="" itemValue="2" />

				</h:selectManyCheckbox>
				<h:outputText value="Answer3"></h:outputText>
				<h:inputText styleClass="inputText answerText"
					value="#{domainBean.answer3}"></h:inputText>

				<h:selectManyCheckbox styleClass="inner-table"
					value="#{domainBean.checkbox3}">
					<f:selectItem itemLabel="" itemValue="3" />

				</h:selectManyCheckbox>
				<h:outputText value="Answer4"></h:outputText>
				<h:inputText styleClass="inputText answerText"
					value="#{domainBean.answer4}"></h:inputText>

				<h:selectManyCheckbox styleClass="inner-table"
					value="#{domainBean.checkbox4}">
					<f:selectItem itemLabel="" itemValue="4" />

				</h:selectManyCheckbox>
			</h:panelGrid>
			<div class="twobut"><h:commandButton
				binding="#{domainBean.submitButton}" value="Submit"
				styleClass="button" action="#{domainBean.insert}"></h:commandButton>

			<h:commandButton value="Cancel" styleClass="button"
				action="testerhome.xhtml"/>
			</div>
			<h:messages
				id="addquestionmessages" styleClass="#{domainBean.messageClass}"></h:messages>
			<br />
		</h:form>
		</h:inputHidden>
	</ui:define>
</ui:composition>



</html>